package com.wenan.ui.controls.dateChooser
{
	import mx.containers.HBox;
	
	import spark.components.Label;
	
	public class BorderLabel extends HBox
	{
		public var _label:Label;
		private var _borderColor:uint;
		private var _backgroundColor:uint;
		
		public function BorderLabel()
		{
			super();
			percentWidth = 100;
			percentHeight = 100;
			setStyle("horizontalAlign", "center");
			setStyle("verticalAlign", "middle");
			_label = new Label();
			_label.setStyle("verticalAlign", "middle");
			_label.setStyle("textAlign", "center");
			_label.percentWidth = 96;
			_label.percentHeight = 92;
			addChild(_label);
		}

		public function backgroundColor(value:uint):void
		{
			_backgroundColor = value;
			if (_label)
			{
				_label.setStyle("backgroundColor", _backgroundColor);
			}
		}

		public function borderColor(value:uint):void
		{
			_borderColor = value;
			setStyle("backgroundColor", _borderColor);
		}

		public function set text(value:String):void 
		{
			_label.text = value;
		}
		
		public function get text():String 
		{
			return _label.text;
		}
		
	}
}